home *** CD-ROM | disk | FTP | other *** search
- 'Delphi logon script
- 'The first time you run it, prompts for username and password
- Loop:
- FAST ON
- acct$ = SET$("STORM","Delphi","Username")
- temp$ = SET$("STORM","Delphi","Password")
- pwd$ = ""
- 'A Basic oddity, FOR loop will always be executed once!
- 'So check length first
- 'Decrypt it
- IF LEN(temp$) > 0 THEN
- FOR x = 1 TO LEN(temp$)
- pwd$ = pwd$ + CHR$( ASC( MID$(temp$,x,1)) XOR 255)
- NEXT x
- ENDIF
- '
- IF LEN(acct$) = 0 OR LEN(pwd$) = 0 THEN
- GOSUB Setup
- IF LEN(acct$) = 0 OR LEN(pwd$) = 0 THEN
- GOTO Loop
- ELSE PRINT "Delphi setup Complete"
- PRINT "Thank you"
- PRINT "========="
- END
- ENDIF
- ENDIF
- 'Now do actual logon using Tymnet
- FAST OFF
- TERM OFF
- TOPW 1
- '
- WAIT 2,"identifier"
- SEND "O";
- WAIT 5,"please log in:"
- IF WAIT(0) = 0 THEN
- Failure:
- TOPW 3
- PRINT "Logon Failed"; CHR$(7)
- TERM ON
- END
- ENDIF
- SEND "DELPHI"
- WAIT 5,"Username:"
- SEND acct$
- WAIT 5,"Password:"
- SEND pwd$
- DUPLEX FULL
- TERM ON
- END
- '
- 'Prompt user for Delphi account and password
- 'And store information in STORM.INI file, after confirming it.
- Setup:
- TOPW 3:CLS :PRINT "Welcome to Storm's Delphi Setup Script"
- PRINT "===========================================":PRINT
- IF LEN(acct$) > 0 THEN GetPassword
- RepeatAcct:
- PRINT
- PRINT "Please enter your username";
- INPUT acct$
- IF LEN(acct$) = 0 THEN RepeatAcct
- 'Since acct was absent, assume password was as well
- GetPassword:
- PRINT
- PRINT "Please enter your password";
- INPUT pwd$
- IF LEN(pwd$) = 0 THEN GetPassword
- temp$ = ""
- 'Simple hack to encrypt password into graphics/foreign characters
- FOR x = 1 TO LEN(pwd$)
- temp$ = temp$ + CHR$( ASC( MID$(pwd$,x,1)) XOR 255)
- NEXT x
- PRINT "Your Username is ";acct$
- PRINT "Your Password is ";pwd$
- PRINT "Is that correct (Y/N)"
- INPUT confirm$
- confirm$ = UCASE$( LEFT$(confirm$,1))
- IF confirm$ <> "Y" THEN RepeatAcct
- SET "STORM","Delphi","Password",temp$
- SET "STORM","Delphi","Username",acct$
- RETURN
-
-
-